#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
void itob(int i, char *ps)
{
    int n;
    const static int size = CHAR_BIT * sizeof(int);
    for (n = size - 1; n >= 0; n--, i >>= 1)
        ps[n] = (01 & i) + '0';
    ps[size] = '\0';
}

int main()
{
    /*******************code*******************/
    int i = 138;
    char ps[CHAR_BIT * sizeof(int) + 1];
    itob(i, ps);
    /******************************************/
    printf("\n\n****************************\n");
    printf("Press Enter key to continue\n");
    getchar();
    return 0;
    /******************************************/
}
